import React,{Component}  from 'react'
import {
    View,
    StyleSheet,
    Text,
    SafeAreaView,
    TouchableOpacity,
} from 'react-native';
import {SCREEN_WIDTH,SCREEN_HEIGHT} from '../../config';

export default class HomePage extends Component {

    constructor(props){
        super(props);
        this.state = {
            isLoading :false,
            message:'',
            isBackground:true,
            loadColor:'#fff'
        };
    }
    componentWillUnmount() {

        this.timer1 && clearTimeout(this.timer1);

    }

    render(){
        return (
            <View style={styles.container}>
                  {this.renderHeader()}
                <SafeAreaView style={styles.container}>
                    <TouchableOpacity style={styles.button} onPress={() => this._goDetail()}>
                        <Text style={styles.buttonText}>详情</Text>
                    </TouchableOpacity>
                   
                </SafeAreaView>
            </View>
        )
    }
    renderHeader() {
        return (
            <View >
                {/* <NavigationHeader  titleText={'录制指纹'} /> */}
            </View>
        );
    }
    _goDetail(){
        this.props.navigation.navigate('HomeDetailPage', {
            title: '首页详情'
        })


    }
  

}


const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#E2E2E2',
        justifyContent:'center',
        alignItems:'center',
     
    },

    button:{
        width:100,
        height:50,
        backgroundColor: '#FFFF00',
        justifyContent:'center',
        alignItems:'center',
        marginBottom:10,
    }

});
